import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import router from "@/router";
import axios from "axios";
import '@/assets/iconfont.css';
import '@/assets/iconfont.js';
import '@/assets/iconfont.json';



axios.defaults.baseURL = "http://localhost:8081";

axios.interceptors.request.use((config) => {
    let token = localStorage.getItem("token");
    console.log(token);
    if (token)
        config.headers['token'] =token;
    console.log(config);
    return config;
})

const app  = createApp(App)
app.use(ElementPlus);
app.use(router)
app.mount('#app')
                  